﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web.Master" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="UI.index1" %>
<%@ Import Namespace="Model" %>
<%@ Import Namespace="DAL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="banner_tabs" class="flexslider">
	    <ul class="slides">
            <%
            foreach(AdInfo info in adlist){ %>
		    <li>
			    <a title="<%=info.name%>" target="_blank" href="<%=info.link%>" onclick="clicks(<%=info.id%>)">
				    <img width="90%" alt="" style="background: url(<%=info.img%>) no-repeat;background-size:90%; margin-left:5%;" src="/img/alpha.png" border="0">
			    </a>
		    </li>
            <%}%>
	    </ul>
	    <ul class="flex-direction-nav">
		    <li><a class="flex-prev" href="javascript:;">Previous</a></li>
		    <li><a class="flex-next" href="javascript:;">Next</a></li>
	    </ul>
        <!--
	    <ol id="bannerCtrl" class="flex-control-nav flex-control-paging">
            <%for (int i = 1; i <= adlist.Count;i++ )
                { %>
		    <li <%=(i==1)?"class='active'":"" %> ><a><%=i %></a></li>
            <%} %>
	    </ol>
        -->
    </div>
    <div class="work" style="border-top:2px solid #c8c8c8;">
        <div class="title"><img src="/img/work.png"/></div>
    </div>
    <div class="zuixinzuopin">
        <div class="top">
            <div class="square1"><a href="imginfo.aspx?id=<%=B.Instance<ProductInfo>(productlist.FirstOrDefault(x => x.positions == 1)).id %>" target="_blank"><img src='<%=string.IsNullOrEmpty(m1)?"/img/p1.png":m1 %>'/></a></div>
            <div class="square2"><a href="imginfo.aspx?id=<%=B.Instance<ProductInfo>(productlist.FirstOrDefault(x => x.positions == 2)).id %>" target="_blank"><img src='<%=string.IsNullOrEmpty(m2)?"/img/p2.png":m2 %>'/></a></div>
            <div class="square3"><img src='<%=string.IsNullOrEmpty(p1)?"/img/p3.png":p1 %>' onclick="show_video('<%=B.Instance<ProductInfo>(productlist.FirstOrDefault(x => x.positions == 1)).path %>')"/></div>
            <div class="square4"><img src='<%=string.IsNullOrEmpty(p2)?"/img/p4.png":p2 %>' onclick="show_video('<%=B.Instance<ProductInfo>(productlist.FirstOrDefault(x => x.positions == 2)).path %>')"/></div>
        </div>
        <div class="bottom">
            <div class="left">
                <a href="imginfo.aspx?id=<%=B.Instance<ProductInfo>(productlist.FirstOrDefault(x => x.positions == 1)).id %>" target="_blank"><img src='<%=string.IsNullOrEmpty(m3)?"/img/p5.png":m3 %>'/></a>
            </div>
            <div class="right">
                <div class="righttop">
                    <div class="square6"><a href="imginfo.aspx?id=<%=B.Instance<ProductInfo>(productlist.FirstOrDefault(x => x.positions == 1)).id %>" target="_blank"><img src='<%=string.IsNullOrEmpty(m4)?"/img/p6.png":m4 %>'/></a></div>
                    <div class="square7"><img src='<%=string.IsNullOrEmpty(p3)?"/img/p7.png":p3 %>' onclick="show_video('<%=B.Instance<ProductInfo>(productlist.FirstOrDefault(x => x.positions == 3)).path %>')"/></div>
                </div>
                <div class="rightbottom">
                    <div class="square8"><img src='<%=string.IsNullOrEmpty(p4)?"/img/p8.png":p4 %>' onclick="show_video('<%=B.Instance<ProductInfo>(productlist.FirstOrDefault(x => x.positions == 4)).path %>')"/></div>
                    <div class="square9"><img src='<%=string.IsNullOrEmpty(p5)?"/img/p9.png":p5 %>' onclick="show_video('<%=B.Instance<ProductInfo>(productlist.FirstOrDefault(x => x.positions == 5)).path %>')"/></div>
                </div>
            </div>
        </div>
    </div>
    <div class="work" style="margin-top:20px;">
        <div class="title"><img src="/img/business.png"/></div>
    </div>
    <div class="jianduan">
        <div class="item" style="margin-left:0px;"><img src="/img/j1.png" /></div>
        <div class="item"><img src="/img/j2.png"/></div>
        <div class="item"><img src="/img/j3.png"/></div>
        <div class="item"><img src="/img/j4.png"/></div>
        <div class="item"><img src="/img/j5.png"/></div>
    </div>
    <div style="width:90%; margin-left:5%; height:2px; float:left; font-size:0px; line-height:2px; background:#d59d0a; margin-top:20px; margin-bottom:20px;"></div>
    <div class="news5">
        <div class="left" style="float:left;">
            <div class="title"><img src="/img/newtitle.png"/></div>
            <%
                foreach (NewsInfo info in newslist)
                {
            %>
            <div class="item"><div class="title"><a href="/news/newsinfo-<%=info.id %>.html"><%=info.name%></a></div><div class="date"><%=info.createdate.ToString("yyyy-MM-dd")%></div></div>
            <%} %>
        </div>
        <div class="right"><img src="/img/titleimg.png"  height="420"/></div>
    </div>
    <script type="text/javascript">
        $(function () {
            var bannerSlider = new Slider($('#banner_tabs'), {
                time: 5000,
                delay: 400,
                event: 'hover',
                auto: true,
                mode: 'fade',
                controller: $('#bannerCtrl'),
                activeControllerCls: 'active'
            });
            $('#banner_tabs .flex-prev').click(function () {
                bannerSlider.prev()
            });
            $('#banner_tabs .flex-next').click(function () {
                bannerSlider.next()
            });
        });
        function clicks(id) {
            var data = {};
            data.act = "Click_Ad";
            data.id = id;
            Ajax.Post("/system/tools/Admin.ashx", data, function (r) {
            });
        };
</script>

</asp:Content>
